import request from "@/utils/request";
import { download, downloadOfGet } from "@/utils/request";

// 查询故障树列表-上表
export function getDeviceMonitorList(params) {
  return request({
    url: "DeviceStatusMonitor/DeviceStatusMonitor/deviceMonitorList",
    method: "get",
    params,
  });
}
// 删除历史规则
export function deviceMonitorBasic(id) {
  return request({
    url: '/DeviceMonitorBasic/deviceMonitorBasic/' + id,
    method: 'delete'
  })
}
// 开启监视
export function updateMonitorStatus(params) {
  return request({
    url: "/DeviceStatusMonitorConfig/DeviceStatusMonitorConfig/updateMonitorStatus",
    method: "get",
    params,
  });
}
// 新建弹窗
export function getDeviceInfoList(params) {
  return request({
    url: "/device/getDeviceInfoList",
    method: "get",
    params,
  });
}
// 新建弹窗 - 明细
export function findDeviceModeDetailList(data) {
  return request({
    url: "/DeviceStatusMonitor/DeviceStatusMonitor/findDeviceModeDetailList",
    method: "post",
    data,
  });
}
// 新建弹窗 - 保存
export function submitdevicMonitorBasic(data) {
  return request({
    url: "/DeviceMonitorBasic/deviceMonitorBasic/submit",
    method: "post",
    data,
  });
}
// 新建弹窗 - 导入
export function importMonitor(params) {
  return request({
    url: "/DeviceStatusMonitorConfig/DeviceStatusMonitorConfig/importMonitor",
    method: "get",
    params,
  });
}
// 历史弹窗
export function getMonitorBasicList(params) {
  return request({
    url: "/DeviceMonitorBasic/deviceMonitorBasic/list",
    method: "get",
    params,
  });
}
// 历史弹窗 - 明细
export function getMoniterDetailList(params) {
  return request({
    url: "/deviceMoniterDetail/deviceMoniterDetail/list",
    method: "get",
    params,
  });
}

// 历史弹窗 -导出 -同新建导入
export function exportMonitorBasic(params) {
  return request({
    url: "/DeviceMonitorBasic/deviceMonitorBasic/export",
    method: "get",
    params,
  });
}
